﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace TrupalTVCDA
{
    public class ProduccionDA
    {

        public Int64 RegistrarTVC(TrupalTVCEF.TBPROTVC oTBPROTVC)
        {
            Int64 idTBPROTVC = 0;
            try
            {
                var db = new TrupalTVCEF.BDTVCTrupalEntities();

                db.AddToTBPROTVC(oTBPROTVC);
                db.SaveChanges();
                idTBPROTVC = Convert.ToInt64(oTBPROTVC.TVCIN_CORTVCPR);

            }
            catch (Exception)
            {
                //throw;
                return idTBPROTVC;
            }

            return idTBPROTVC;

        }
    }
}
